/**
 * 
 */
package net.anzix.jhacks.flexclipse.wizards;

import net.anzix.jhacks.flexclipse.Activator;

import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

/**
 * @author kocka
 *
 */
public class FlexProjectWizard extends Wizard implements INewWizard {

	FlexProjectNameWizardPage projectNameWizardPage;
	
	FlexLibrariesWizardPage librariesWizardPage;

	public void init(IWorkbench workbench, IStructuredSelection selection) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void addPages() {
		super.addPages();
		final ImageDescriptor fxImageDescriptor = Activator.getImageDescriptor("icons/Fx.gif");

		projectNameWizardPage = new FlexProjectNameWizardPage("flexclipse.projectNamePage","Project name", fxImageDescriptor);
		this.addPage(projectNameWizardPage);

		librariesWizardPage = new FlexLibrariesWizardPage("flexclipse.LibraryPage", "Flash libraries", fxImageDescriptor);
		this.addPage(librariesWizardPage);
	}

	@Override
	public boolean canFinish() {
		return !"".equals(projectNameWizardPage.getProjectName());
	}

	@Override
	public boolean performFinish() {
		
		return true;
	}

}
